#ifndef _ITEM_H_
#define _ITEM_H_

#include "vec.hpp"

class Image;
class Sound;

class Player;

#include "actor.hpp"

class Item : public Actor
{
public:
	class Type;

	class Ammo;
	class Point;
	//class Shot;

	enum TypeN
	{
		NOTYPE = -1,

		AMMO,
		AMMO_S = AMMO,
		AMMO_L,

		POINT,
		POINT_S = POINT,
		POINT_M,
		POINT_L,
		POINT_XL,
		POINT_XXL,
		POINT_XXXL,

		//SHOT,
		//SHOT_BULLET = SHOT,
		//SHOT_BUBBLE,
		//SHOT_CLOUD,
		//SHOT_BALL,
		//SHOT_OPTION,
		TYPECT
	};

	Item();
	~Item();

	static bool TSecret(int t)
	{
		return false;//POINT_XL <= t && t <= POINT_XXXL;
	}

	static bool Open();

	void Init(float centx, float centy, Cue & cue);

	void Update();

	bool Spawning()
	{
		return alpha < 1;
	};

	void Hit(Player & plr);

	void Fall();

	friend class Player;

private:
	Type *type;
	int typen;
	
	int amt;
};

#include "actor.hpp"
extern ActPool<Item, 64> Itms;

#endif
